<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>VW适配</title>
    <style>
        *{
            margin:0;
            padding:0;
        }
        html{
            /*网页中字体大小最小是12px，不能设置一个比12像素还小的字体，
            如果我们设置了小于12px的字体，则字体自动设置为12px
            1.333vw=10px
            5.333vw=40px
            */
            font-size: 5.333vw;/**/
        }
        .box1{
            /*em
            1rem = 1html字体大小
            1rem = 40px*/
            width:1.2rem;
            height:0.875rem;
            background-color: chartreuse;
        }

    </style>
</head>
<body>
    <div class="box1"></div>
    
</body>
</html>